package cn.xiaobai.core.config;

import com.gitee.starblues.integration.AutoIntegrationConfiguration;
import com.gitee.starblues.integration.IntegrationConfiguration;
import com.gitee.starblues.integration.application.AutoPluginApplication;
import com.gitee.starblues.integration.application.PluginApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * @Author yangdaji
 * @Date 2023/12/5
 * @PackageName cn.xiaobai.core.config
 * @ClassName PluginConfig
 */
@Configuration
public class PluginBeanConfig {


    @Bean
    public PluginApplication pluginApplication() {
        return new AutoPluginApplication();
    }


    @Bean
    public IntegrationConfiguration integrationConfiguration() {
        return new AutoIntegrationConfiguration();
    }


    @Bean
    @Primary
    public AbstractHandlerMapping handlerMapping() {
        return new RequestMappingHandlerMapping();
    }

}
